Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: runs ls #640

Merged
merged 9 commits into from
Sep 11, 2024
Merged

feat: runs ls #640

merged 9 commits into from
Sep 11, 2024

Conversation

vladfrangu
Copy link
Member

Tackles one of the runs task in #619

Depends on #620

Runs list for Actor:

Code - 2024-09-09 at 16 07 02@2x

Message when no runs are found (inactive actor)

Code - 2024-09-09 at 16 08 28@2x

JSON output

Code - 2024-09-09 at 16 12 38@2x

@vladfrangu vladfrangu added the adhoc Ad-hoc unplanned task added during the sprint. label Sep 9, 2024
@vladfrangu vladfrangu requested review from netmilk and B4nan September 9, 2024 13:13
@github-actions github-actions bot added this to the 98th sprint - Tooling team milestone Sep 9, 2024
@github-actions github-actions bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Sep 9, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Pull Request Tookit has failed!

If issue is not linked to the pull request then estimate the pull request!

src/commands/runs/ls.ts Outdated Show resolved Hide resolved
src/commands/runs/ls.ts Outdated Show resolved Hide resolved
src/commands/runs/ls.ts Outdated Show resolved Hide resolved
src/commands/runs/ls.ts Outdated Show resolved Hide resolved

const client = await getLoggedClientOrThrow();

// TODO: technically speaking, we don't *need* an actor id to list builds. But it makes more sense to have a table of builds for a specific actor.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this TODO mean? maybe it should be just a regular comment?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been copied 1:1 from builds (where the same is applicable). We don't need an actor id passed/present to list builds/runs, as we can fetch global list, but it makes more sense to fetch per-actor. Probably best to decide for runs if that still is the case

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am actually using this page quite often, i dont think we should disallow listing all runs of a given user. i agree with builds, that feels weird without the actor context.


what i mean with my comment is that the TODO is not telling me what is missing, what should be done, what is to do, heh


const datasetInfos = new Map(
await Promise.all(
allRuns.items.map(async (run) =>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is effectively N+1 problem, which is never a good thing to have in your code. let's try asking on slack if there is some way to get the data with a single API request

it's not a huge deal if there wont be too many items in the list (and we use default limit of 10, so fini'ish as long as the user doesn't try to list last 200 runs...)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed on slack, we'll keep this because we can't do much at this time, and implement a spinner in the future

@vladfrangu
Copy link
Member Author

New alignment after some discussions, but we still need more work
image

@vladfrangu
Copy link
Member Author

Post responsive work (looks the same)
Code - 2024-09-10 at 11 13 55@2x

@B4nan
Copy link
Member

B4nan commented Sep 10, 2024

build number should be also aligned to right btw

@vladfrangu
Copy link
Member Author

build number should be also aligned to right btw

i'll do it for builds too (thankfully now its ezpz and super clear how to do so) 😄

@vladfrangu vladfrangu marked this pull request as ready for review September 11, 2024 08:56
@vladfrangu vladfrangu changed the title feat: runs ls feat: runs ls Sep 11, 2024
@vladfrangu vladfrangu merged commit dd84d37 into master Sep 11, 2024
19 checks passed
@vladfrangu vladfrangu deleted the feat/run-ls branch September 11, 2024 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants